package com.gisuni.sddc.platformManager.model;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;


/**
 * ResourceRLayerId entity. @author MyEclipse Persistence Tools
 */
@Table(value = "SDDCGISPLATFORM.RESOURCE_R_LAYER")
public class ResourceRLayer implements java.io.Serializable {

	// Fields
	
	@Column(value = "ID")
	private String id;
	@Name
	@Column(value = "RESOURCE_ID")
	private String resourceId;
	@Column(value = "LAYER_ID" )
	private String layerId;
	@Column(value = "FIELDS" )
	private String fields;
	@Column(value = "EDITTABLE" )
	private int edittable;
	@Column(value = "CHANGELEVEL" )
	private int changelevel;
	// Constructors
	@Column("TILEFLAG")
	private int tileFlag;

	

	public int getTileFlag() {
		return tileFlag;
	}

	public void setTileFlag(int tileFlag) {
		this.tileFlag = tileFlag;
	}

	public int getChangelevel() {
		return changelevel;
	}

	public void setChangelevel(int changelevel) {
		this.changelevel = changelevel;
	}

	/** default constructor */
	public ResourceRLayer() {
	}

	/** minimal constructor */
	public ResourceRLayer(String id, String resourceId) {
		this.id = id;
		this.resourceId = resourceId;
	}

	/** full constructor */
	public ResourceRLayer(String id, String resourceId, String layerId,
			String fields,int edittable,int changelevel) {
		this.id = id;
		this.resourceId = resourceId;
		this.layerId = layerId;
		this.fields = fields;
		this.edittable = edittable;
		this.changelevel = changelevel;
	}

	// Property accessors

	
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getResourceId() {
		return this.resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	
	public String getLayerId() {
		return this.layerId;
	}

	public void setLayerId(String layerId) {
		this.layerId = layerId;
	}
	
	public String getFields() {
		return this.fields;
	}

	public void setFields(String fields) {
		this.fields = fields;
	}
	
	public int getEdittable() {
		return edittable;
	}

	public void setEdittable(int edittable) {
		this.edittable = edittable;
	}
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ResourceRLayer))
			return false;
		ResourceRLayer castOther = (ResourceRLayer) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getResourceId() == castOther.getResourceId()) || (this
						.getResourceId() != null
						&& castOther.getResourceId() != null && this
						.getResourceId().equals(castOther.getResourceId())))
				&& ((this.getLayerId() == castOther.getLayerId()) || (this
						.getLayerId() != null
						&& castOther.getLayerId() != null && this.getLayerId()
						.equals(castOther.getLayerId())))
				&& ((this.getFields() == castOther.getFields()) || (this
						.getFields() != null
						&& castOther.getFields() != null && this.getFields()
						.equals(castOther.getFields())));
	}

	public int hashCode() {
		int result = 17;
		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37
				* result
				+ (getResourceId() == null ? 0 : this.getResourceId()
						.hashCode());
		result = 37 * result
				+ (getLayerId() == null ? 0 : this.getLayerId().hashCode());
		result = 37 * result
				+ (getFields() == null ? 0 : this.getFields().hashCode());
		return result;
	}

}